/*
* Copyright (C) 2015-2025 Renesas Electronics Corporation and/or its affiliates
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/******************************************************************************
* File Name    : r_flash_rx130.h
* Description  : This file has specific information about the ROM and DF on 
*                RX130 MCUs.
*******************************************************************************
* History : DD.MM.YYYY Version Description
*         : 22.10.2015 1.00    First Release
*         : 22.07.2016 2.00    Modified for BSPless flash. Modified values for
*                              FLASH_CF_LOWEST_VALID_BLOCK and FLASH_CF_BLOCK_INVALID.
*         : 22.05.2017 2.10    Added CF block defines for 256K, 384K, and 512K parts.
*         : 07.06.2021 4.80    Added WAIT_MAX_EXRDY_CMD_TIMEOUT.
*         : 20.03.2025 5.22    Changed the disclaimer in program sources
******************************************************************************/

#ifndef _FLASH_API_RX130_H
#define _FLASH_API_RX130_H

/******************************************************************************
Includes   <System Includes> , "Project Includes"
******************************************************************************/
/* Defines standard typedefs used in this file */
#include <stdint.h>
/******************************************************************************
Macro definitions
******************************************************************************/
#define FLASH_NUM_BLOCKS_DF        (8)
#define FLASH_DF_MIN_PGM_SIZE      (1)      // Table 39.53 in HW Manual
#define FLASH_CF_MIN_PGM_SIZE      (4)      // Table 39.50 in HW Manual

#define FLASH_CF_BLOCK_SIZE        (1024)
#define FLASH_DF_BLOCK_SIZE        (1024)
#define FLASH_DF_FULL_SIZE         (FLASH_NUM_BLOCKS_DF*FLASH_DF_BLOCK_SIZE)
#define FLASH_DF_FULL_PGM_SIZE     (FLASH_DF_FULL_SIZE-FLASH_DF_MIN_PGM_SIZE)
#define FLASH_DF_LAST_VALID_ADDR   (FLASH_DF_BLOCK_INVALID-1)
#define FLASH_DF_HIGHEST_VALID_BLOCK  (FLASH_DF_BLOCK_INVALID-FLASH_DF_BLOCK_SIZE)


#define FLASH_NUM_BLOCKS_CF         ((MCU_ROM_SIZE_BYTES) / (FLASH_CF_BLOCK_SIZE))
#define FLASH_CF_FULL_SIZE          (FLASH_NUM_BLOCKS_CF*FLASH_CF_BLOCK_SIZE)
#define FLASH_CF_LOWEST_VALID_BLOCK (FLASH_CF_BLOCK_INVALID + 1)
#define FLASH_CF_LAST_VALID_ADDR    (FLASH_CF_LOWEST_VALID_BLOCK)

#define FLASH_CF_256KBOUNDARY       (0xFFFC0000)

/* Delay function Setting */
#define WAIT_DIV_LOOP_CYCLE         (5000) /* 4 cycle of 1 loop * 1000(us) */
#define WAIT_OVERHEAD_COUNT         (4)    /* Overhead is reduced from a loop count.
                                              overhead loop count = 20 cycle / 4 cycle of 1 loop */

/***********************************************************************************************************************
Typedef definitions
***********************************************************************************************************************/
typedef enum _flash_block_address
{
    FLASH_CF_BLOCK_END     = 0xFFFFFFFF,    /*   Top of the CS */
    FLASH_CF_BLOCK_0       = 0xFFFFFC00,    /*   1KB: 0xFFFFFC00 - 0xFFFFFFFF */
    FLASH_CF_BLOCK_1       = 0xFFFFF800,    /*   1KB: 0xFFFFF800 - 0xFFFFFBFF */
    FLASH_CF_BLOCK_2       = 0xFFFFF400,    /*   1KB: 0xFFFFF400 - 0xFFFFF7FF */
    FLASH_CF_BLOCK_3       = 0xFFFFF000,    /*   1KB: 0xFFFFF000 - 0xFFFFF3FF */
    FLASH_CF_BLOCK_4       = 0xFFFFEC00,    /*   1KB: 0xFFFFEC00 - 0xFFFFEFFF */
    FLASH_CF_BLOCK_5       = 0xFFFFE800,    /*   1KB: 0xFFFFE800 - 0xFFFFEBFF */
    FLASH_CF_BLOCK_6       = 0xFFFFE400,    /*   1KB: 0xFFFFE400 - 0xFFFFE7FF */
    FLASH_CF_BLOCK_7       = 0xFFFFE000,    /*   1KB: 0xFFFFE000 - 0xFFFFE3FF */
    FLASH_CF_BLOCK_8       = 0xFFFFDC00,    /*   1KB: 0xFFFFDC00 - 0xFFFFDFFF */
    FLASH_CF_BLOCK_9       = 0xFFFFD800,    /*   1KB: 0xFFFFD800 - 0xFFFFDBFF */
    FLASH_CF_BLOCK_10      = 0xFFFFD400,    /*   1KB: 0xFFFFD400 - 0xFFFFD7FF */
    FLASH_CF_BLOCK_11      = 0xFFFFD000,    /*   1KB: 0xFFFFD000 - 0xFFFFD3FF */
    FLASH_CF_BLOCK_12      = 0xFFFFCC00,    /*   1KB: 0xFFFFCC00 - 0xFFFFCFFF */
    FLASH_CF_BLOCK_13      = 0xFFFFC800,    /*   1KB: 0xFFFFC800 - 0xFFFFCBFF */
    FLASH_CF_BLOCK_14      = 0xFFFFC400,    /*   1KB: 0xFFFFC400 - 0xFFFFC7FF */
    FLASH_CF_BLOCK_15      = 0xFFFFC000,    /*   1KB: 0xFFFFC000 - 0xFFFFC3FF */
    FLASH_CF_BLOCK_16      = 0xFFFFBC00,    /*   1KB: 0xFFFFBC00 - 0xFFFFBFFF */
    FLASH_CF_BLOCK_17      = 0xFFFFB800,    /*   1KB: 0xFFFFB800 - 0xFFFFBBFF */
    FLASH_CF_BLOCK_18      = 0xFFFFB400,    /*   1KB: 0xFFFFB400 - 0xFFFFB7FF */
    FLASH_CF_BLOCK_19      = 0xFFFFB000,    /*   1KB: 0xFFFFB000 - 0xFFFFB3FF */
    FLASH_CF_BLOCK_20      = 0xFFFFAC00,    /*   1KB: 0xFFFFAC00 - 0xFFFFAFFF */
    FLASH_CF_BLOCK_21      = 0xFFFFA800,    /*   1KB: 0xFFFFA800 - 0xFFFFABFF */
    FLASH_CF_BLOCK_22      = 0xFFFFA400,    /*   1KB: 0xFFFFA400 - 0xFFFFA7FF */
    FLASH_CF_BLOCK_23      = 0xFFFFA000,    /*   1KB: 0xFFFFA000 - 0xFFFFA3FF */
    FLASH_CF_BLOCK_24      = 0xFFFF9C00,    /*   1KB: 0xFFFF9C00 - 0xFFFF9FFF */
    FLASH_CF_BLOCK_25      = 0xFFFF9800,    /*   1KB: 0xFFFF9800 - 0xFFFF9BFF */
    FLASH_CF_BLOCK_26      = 0xFFFF9400,    /*   1KB: 0xFFFF9400 - 0xFFFF97FF */
    FLASH_CF_BLOCK_27      = 0xFFFF9000,    /*   1KB: 0xFFFF9000 - 0xFFFF93FF */
    FLASH_CF_BLOCK_28      = 0xFFFF8C00,    /*   1KB: 0xFFFF8C00 - 0xFFFF8FFF */
    FLASH_CF_BLOCK_29      = 0xFFFF8800,    /*   1KB: 0xFFFF8800 - 0xFFFF8BFF */
    FLASH_CF_BLOCK_30      = 0xFFFF8400,    /*   1KB: 0xFFFF8400 - 0xFFFF87FF */
    FLASH_CF_BLOCK_31      = 0xFFFF8000,    /*   1KB: 0xFFFF8000 - 0xFFFF83FF */
    FLASH_CF_BLOCK_32      = 0xFFFF7C00,    /*   1KB: 0xFFFF7C00 - 0xFFFF7FFF */
    FLASH_CF_BLOCK_33      = 0xFFFF7800,    /*   1KB: 0xFFFF7800 - 0xFFFF7BFF */
    FLASH_CF_BLOCK_34      = 0xFFFF7400,    /*   1KB: 0xFFFF7400 - 0xFFFF77FF */
    FLASH_CF_BLOCK_35      = 0xFFFF7000,    /*   1KB: 0xFFFF7000 - 0xFFFF73FF */
    FLASH_CF_BLOCK_36      = 0xFFFF6C00,    /*   1KB: 0xFFFF6C00 - 0xFFFF6FFF */
    FLASH_CF_BLOCK_37      = 0xFFFF6800,    /*   1KB: 0xFFFF6800 - 0xFFFF6BFF */
    FLASH_CF_BLOCK_38      = 0xFFFF6400,    /*   1KB: 0xFFFF6400 - 0xFFFF67FF */
    FLASH_CF_BLOCK_39      = 0xFFFF6000,    /*   1KB: 0xFFFF6000 - 0xFFFF63FF */
    FLASH_CF_BLOCK_40      = 0xFFFF5C00,    /*   1KB: 0xFFFF5C00 - 0xFFFF5FFF */
    FLASH_CF_BLOCK_41      = 0xFFFF5800,    /*   1KB: 0xFFFF5800 - 0xFFFF5BFF */
    FLASH_CF_BLOCK_42      = 0xFFFF5400,    /*   1KB: 0xFFFF5400 - 0xFFFF57FF */
    FLASH_CF_BLOCK_43      = 0xFFFF5000,    /*   1KB: 0xFFFF5000 - 0xFFFF53FF */
    FLASH_CF_BLOCK_44      = 0xFFFF4C00,    /*   1KB: 0xFFFF4C00 - 0xFFFF4FFF */
    FLASH_CF_BLOCK_45      = 0xFFFF4800,    /*   1KB: 0xFFFF4800 - 0xFFFF4BFF */
    FLASH_CF_BLOCK_46      = 0xFFFF4400,    /*   1KB: 0xFFFF4400 - 0xFFFF47FF */
    FLASH_CF_BLOCK_47      = 0xFFFF4000,    /*   1KB: 0xFFFF4000 - 0xFFFF43FF */
    FLASH_CF_BLOCK_48      = 0xFFFF3C00,    /*   1KB: 0xFFFF3C00 - 0xFFFF3FFF */
    FLASH_CF_BLOCK_49      = 0xFFFF3800,    /*   1KB: 0xFFFF3800 - 0xFFFF3BFF */
    FLASH_CF_BLOCK_50      = 0xFFFF3400,    /*   1KB: 0xFFFF3400 - 0xFFFF37FF */
    FLASH_CF_BLOCK_51      = 0xFFFF3000,    /*   1KB: 0xFFFF3000 - 0xFFFF33FF */
    FLASH_CF_BLOCK_52      = 0xFFFF2C00,    /*   1KB: 0xFFFF2C00 - 0xFFFF2FFF */
    FLASH_CF_BLOCK_53      = 0xFFFF2800,    /*   1KB: 0xFFFF2800 - 0xFFFF2BFF */
    FLASH_CF_BLOCK_54      = 0xFFFF2400,    /*   1KB: 0xFFFF2400 - 0xFFFF27FF */
    FLASH_CF_BLOCK_55      = 0xFFFF2000,    /*   1KB: 0xFFFF2000 - 0xFFFF23FF */
    FLASH_CF_BLOCK_56      = 0xFFFF1C00,    /*   1KB: 0xFFFF1C00 - 0xFFFF1FFF */
    FLASH_CF_BLOCK_57      = 0xFFFF1800,    /*   1KB: 0xFFFF1800 - 0xFFFF1BFF */
    FLASH_CF_BLOCK_58      = 0xFFFF1400,    /*   1KB: 0xFFFF1400 - 0xFFFF17FF */
    FLASH_CF_BLOCK_59      = 0xFFFF1000,    /*   1KB: 0xFFFF1000 - 0xFFFF13FF */
    FLASH_CF_BLOCK_60      = 0xFFFF0C00,    /*   1KB: 0xFFFF0C00 - 0xFFFF0FFF */
    FLASH_CF_BLOCK_61      = 0xFFFF0800,    /*   1KB: 0xFFFF0800 - 0xFFFF0BFF */
    FLASH_CF_BLOCK_62      = 0xFFFF0400,    /*   1KB: 0xFFFF0400 - 0xFFFF07FF */
    FLASH_CF_BLOCK_63      = 0xFFFF0000,    /*   1KB: 0xFFFF0000 - 0xFFFF03FF */
#if   MCU_CFG_PART_MEMORY_SIZE == 0x3   //   '3' parts 64KB ROM
    FLASH_CF_BLOCK_INVALID = (FLASH_CF_BLOCK_63 - 1),
#else
    FLASH_CF_BLOCK_64      = 0xFFFEFC00,    /*   1KB: 0xFFFEFC00 - 0xFFFEFFFF */
    FLASH_CF_BLOCK_65      = 0xFFFEF800,    /*   1KB: 0xFFFEF800 - 0xFFFEFBFF */
    FLASH_CF_BLOCK_66      = 0xFFFEF400,    /*   1KB: 0xFFFEF400 - 0xFFFEF7FF */
    FLASH_CF_BLOCK_67      = 0xFFFEF000,    /*   1KB: 0xFFFEF000 - 0xFFFEF3FF */
    FLASH_CF_BLOCK_68      = 0xFFFEEC00,    /*   1KB: 0xFFFEEC00 - 0xFFFEEFFF */
    FLASH_CF_BLOCK_69      = 0xFFFEE800,    /*   1KB: 0xFFFEE800 - 0xFFFEEBFF */
    FLASH_CF_BLOCK_70      = 0xFFFEE400,    /*   1KB: 0xFFFEE400 - 0xFFFEE7FF */
    FLASH_CF_BLOCK_71      = 0xFFFEE000,    /*   1KB: 0xFFFEE000 - 0xFFFEE3FF */
    FLASH_CF_BLOCK_72      = 0xFFFEDC00,    /*   1KB: 0xFFFEDC00 - 0xFFFEDFFF */
    FLASH_CF_BLOCK_73      = 0xFFFED800,    /*   1KB: 0xFFFED800 - 0xFFFEDBFF */
    FLASH_CF_BLOCK_74      = 0xFFFED400,    /*   1KB: 0xFFFED400 - 0xFFFED7FF */
    FLASH_CF_BLOCK_75      = 0xFFFED000,    /*   1KB: 0xFFFED000 - 0xFFFED3FF */
    FLASH_CF_BLOCK_76      = 0xFFFECC00,    /*   1KB: 0xFFFECC00 - 0xFFFECFFF */
    FLASH_CF_BLOCK_77      = 0xFFFEC800,    /*   1KB: 0xFFFEC800 - 0xFFFECBFF */
    FLASH_CF_BLOCK_78      = 0xFFFEC400,    /*   1KB: 0xFFFEC400 - 0xFFFEC7FF */
    FLASH_CF_BLOCK_79      = 0xFFFEC000,    /*   1KB: 0xFFFEC000 - 0xFFFEC3FF */
    FLASH_CF_BLOCK_80      = 0xFFFEBC00,    /*   1KB: 0xFFFEBC00 - 0xFFFEBFFF */
    FLASH_CF_BLOCK_81      = 0xFFFEB800,    /*   1KB: 0xFFFEB800 - 0xFFFEBBFF */
    FLASH_CF_BLOCK_82      = 0xFFFEB400,    /*   1KB: 0xFFFEB400 - 0xFFFEB7FF */
    FLASH_CF_BLOCK_83      = 0xFFFEB000,    /*   1KB: 0xFFFEB000 - 0xFFFEB3FF */
    FLASH_CF_BLOCK_84      = 0xFFFEAC00,    /*   1KB: 0xFFFEAC00 - 0xFFFEAFFF */
    FLASH_CF_BLOCK_85      = 0xFFFEA800,    /*   1KB: 0xFFFEA800 - 0xFFFEABFF */
    FLASH_CF_BLOCK_86      = 0xFFFEA400,    /*   1KB: 0xFFFEA400 - 0xFFFEA7FF */
    FLASH_CF_BLOCK_87      = 0xFFFEA000,    /*   1KB: 0xFFFEA000 - 0xFFFEA3FF */
    FLASH_CF_BLOCK_88      = 0xFFFE9C00,    /*   1KB: 0xFFFE9C00 - 0xFFFE9FFF */
    FLASH_CF_BLOCK_89      = 0xFFFE9800,    /*   1KB: 0xFFFE9800 - 0xFFFE9BFF */
    FLASH_CF_BLOCK_90      = 0xFFFE9400,    /*   1KB: 0xFFFE9400 - 0xFFFE97FF */
    FLASH_CF_BLOCK_91      = 0xFFFE9000,    /*   1KB: 0xFFFE9000 - 0xFFFE93FF */
    FLASH_CF_BLOCK_92      = 0xFFFE8C00,    /*   1KB: 0xFFFE8C00 - 0xFFFE8FFF */
    FLASH_CF_BLOCK_93      = 0xFFFE8800,    /*   1KB: 0xFFFE8800 - 0xFFFE8BFF */
    FLASH_CF_BLOCK_94      = 0xFFFE8400,    /*   1KB: 0xFFFE8400 - 0xFFFE87FF */
    FLASH_CF_BLOCK_95      = 0xFFFE8000,    /*   1KB: 0xFFFE8000 - 0xFFFE83FF */
    FLASH_CF_BLOCK_96      = 0xFFFE7C00,    /*   1KB: 0xFFFE7C00 - 0xFFFE7FFF */
    FLASH_CF_BLOCK_97      = 0xFFFE7800,    /*   1KB: 0xFFFE7800 - 0xFFFE7BFF */
    FLASH_CF_BLOCK_98      = 0xFFFE7400,    /*   1KB: 0xFFFE7400 - 0xFFFE77FF */
    FLASH_CF_BLOCK_99      = 0xFFFE7000,    /*   1KB: 0xFFFE7000 - 0xFFFE73FF */
    FLASH_CF_BLOCK_100     = 0xFFFE6C00,    /*   1KB: 0xFFFE6C00 - 0xFFFE6FFF */
    FLASH_CF_BLOCK_101     = 0xFFFE6800,    /*   1KB: 0xFFFE6800 - 0xFFFE6BFF */
    FLASH_CF_BLOCK_102     = 0xFFFE6400,    /*   1KB: 0xFFFE6400 - 0xFFFE67FF */
    FLASH_CF_BLOCK_103     = 0xFFFE6000,    /*   1KB: 0xFFFE6000 - 0xFFFE63FF */
    FLASH_CF_BLOCK_104     = 0xFFFE5C00,    /*   1KB: 0xFFFE5C00 - 0xFFFE5FFF */
    FLASH_CF_BLOCK_105     = 0xFFFE5800,    /*   1KB: 0xFFFE5800 - 0xFFFE5BFF */
    FLASH_CF_BLOCK_106     = 0xFFFE5400,    /*   1KB: 0xFFFE5400 - 0xFFFE57FF */
    FLASH_CF_BLOCK_107     = 0xFFFE5000,    /*   1KB: 0xFFFE5000 - 0xFFFE53FF */
    FLASH_CF_BLOCK_108     = 0xFFFE4C00,    /*   1KB: 0xFFFE4C00 - 0xFFFE4FFF */
    FLASH_CF_BLOCK_109     = 0xFFFE4800,    /*   1KB: 0xFFFE4800 - 0xFFFE4BFF */
    FLASH_CF_BLOCK_110     = 0xFFFE4400,    /*   1KB: 0xFFFE4400 - 0xFFFE47FF */
    FLASH_CF_BLOCK_111     = 0xFFFE4000,    /*   1KB: 0xFFFE4000 - 0xFFFE43FF */
    FLASH_CF_BLOCK_112     = 0xFFFE3C00,    /*   1KB: 0xFFFE3C00 - 0xFFFE3FFF */
    FLASH_CF_BLOCK_113     = 0xFFFE3800,    /*   1KB: 0xFFFE3800 - 0xFFFE3BFF */
    FLASH_CF_BLOCK_114     = 0xFFFE3400,    /*   1KB: 0xFFFE3400 - 0xFFFE37FF */
    FLASH_CF_BLOCK_115     = 0xFFFE3000,    /*   1KB: 0xFFFE3000 - 0xFFFE33FF */
    FLASH_CF_BLOCK_116     = 0xFFFE2C00,    /*   1KB: 0xFFFE2C00 - 0xFFFE2FFF */
    FLASH_CF_BLOCK_117     = 0xFFFE2800,    /*   1KB: 0xFFFE2800 - 0xFFFE2BFF */
    FLASH_CF_BLOCK_118     = 0xFFFE2400,    /*   1KB: 0xFFFE2400 - 0xFFFE27FF */
    FLASH_CF_BLOCK_119     = 0xFFFE2000,    /*   1KB: 0xFFFE2000 - 0xFFFE23FF */
    FLASH_CF_BLOCK_120     = 0xFFFE1C00,    /*   1KB: 0xFFFE1C00 - 0xFFFE1FFF */
    FLASH_CF_BLOCK_121     = 0xFFFE1800,    /*   1KB: 0xFFFE1800 - 0xFFFE1BFF */
    FLASH_CF_BLOCK_122     = 0xFFFE1400,    /*   1KB: 0xFFFE1400 - 0xFFFE17FF */
    FLASH_CF_BLOCK_123     = 0xFFFE1000,    /*   1KB: 0xFFFE1000 - 0xFFFE13FF */
    FLASH_CF_BLOCK_124     = 0xFFFE0C00,    /*   1KB: 0xFFFE0C00 - 0xFFFE0FFF */
    FLASH_CF_BLOCK_125     = 0xFFFE0800,    /*   1KB: 0xFFFE0800 - 0xFFFE0BFF */
    FLASH_CF_BLOCK_126     = 0xFFFE0400,    /*   1KB: 0xFFFE0400 - 0xFFFE07FF */
    FLASH_CF_BLOCK_127     = 0xFFFE0000,    /*   1KB: 0xFFFE0000 - 0xFFFE03FF */
#if   MCU_CFG_PART_MEMORY_SIZE == 0x5   //   '5' parts 128KB ROM
    FLASH_CF_BLOCK_INVALID = (FLASH_CF_BLOCK_127 - 1),
#else
    FLASH_CF_BLOCK_128     = 0xFFFDFC00,    /*   1KB: 0xFFFDFC00 - 0xFFFDFFFF */
    FLASH_CF_BLOCK_129     = 0xFFFDF800,    /*   1KB: 0xFFFDF800 - 0xFFFDFBFF */
    FLASH_CF_BLOCK_130     = 0xFFFDF400,    /*   1KB: 0xFFFDF400 - 0xFFFDF7FF */
    FLASH_CF_BLOCK_131     = 0xFFFDF000,    /*   1KB: 0xFFFDF000 - 0xFFFDF3FF */
    FLASH_CF_BLOCK_132     = 0xFFFDEC00,    /*   1KB: 0xFFFDEC00 - 0xFFFDEFFF */
    FLASH_CF_BLOCK_133     = 0xFFFDE800,    /*   1KB: 0xFFFDE800 - 0xFFFDEBFF */
    FLASH_CF_BLOCK_134     = 0xFFFDE400,    /*   1KB: 0xFFFDE400 - 0xFFFDE7FF */
    FLASH_CF_BLOCK_135     = 0xFFFDE000,    /*   1KB: 0xFFFDE000 - 0xFFFDE3FF */
    FLASH_CF_BLOCK_136     = 0xFFFDDC00,    /*   1KB: 0xFFFDDC00 - 0xFFFDDFFF */
    FLASH_CF_BLOCK_137     = 0xFFFDD800,    /*   1KB: 0xFFFDD800 - 0xFFFDDBFF */
    FLASH_CF_BLOCK_138     = 0xFFFDD400,    /*   1KB: 0xFFFDD400 - 0xFFFDD7FF */
    FLASH_CF_BLOCK_139     = 0xFFFDD000,    /*   1KB: 0xFFFDD000 - 0xFFFDD3FF */
    FLASH_CF_BLOCK_140     = 0xFFFDCC00,    /*   1KB: 0xFFFDCC00 - 0xFFFDCFFF */
    FLASH_CF_BLOCK_141     = 0xFFFDC800,    /*   1KB: 0xFFFDC800 - 0xFFFDCBFF */
    FLASH_CF_BLOCK_142     = 0xFFFDC400,    /*   1KB: 0xFFFDC400 - 0xFFFDC7FF */
    FLASH_CF_BLOCK_143     = 0xFFFDC000,    /*   1KB: 0xFFFDC000 - 0xFFFDC3FF */
    FLASH_CF_BLOCK_144     = 0xFFFDBC00,    /*   1KB: 0xFFFDBC00 - 0xFFFDBFFF */
    FLASH_CF_BLOCK_145     = 0xFFFDB800,    /*   1KB: 0xFFFDB800 - 0xFFFDBBFF */
    FLASH_CF_BLOCK_146     = 0xFFFDB400,    /*   1KB: 0xFFFDB400 - 0xFFFDB7FF */
    FLASH_CF_BLOCK_147     = 0xFFFDB000,    /*   1KB: 0xFFFDB000 - 0xFFFDB3FF */
    FLASH_CF_BLOCK_148     = 0xFFFDAC00,    /*   1KB: 0xFFFDAC00 - 0xFFFDAFFF */
    FLASH_CF_BLOCK_149     = 0xFFFDA800,    /*   1KB: 0xFFFDA800 - 0xFFFDABFF */
    FLASH_CF_BLOCK_150     = 0xFFFDA400,    /*   1KB: 0xFFFDA400 - 0xFFFDA7FF */
    FLASH_CF_BLOCK_151     = 0xFFFDA000,    /*   1KB: 0xFFFDA000 - 0xFFFDA3FF */
    FLASH_CF_BLOCK_152     = 0xFFFD9C00,    /*   1KB: 0xFFFD9C00 - 0xFFFD9FFF */
    FLASH_CF_BLOCK_153     = 0xFFFD9800,    /*   1KB: 0xFFFD9800 - 0xFFFD9BFF */
    FLASH_CF_BLOCK_154     = 0xFFFD9400,    /*   1KB: 0xFFFD9400 - 0xFFFD97FF */
    FLASH_CF_BLOCK_155     = 0xFFFD9000,    /*   1KB: 0xFFFD9000 - 0xFFFD93FF */
    FLASH_CF_BLOCK_156     = 0xFFFD8C00,    /*   1KB: 0xFFFD8C00 - 0xFFFD8FFF */
    FLASH_CF_BLOCK_157     = 0xFFFD8800,    /*   1KB: 0xFFFD8800 - 0xFFFD8BFF */
    FLASH_CF_BLOCK_158     = 0xFFFD8400,    /*   1KB: 0xFFFD8400 - 0xFFFD87FF */
    FLASH_CF_BLOCK_159     = 0xFFFD8000,    /*   1KB: 0xFFFD8000 - 0xFFFD83FF */
    FLASH_CF_BLOCK_160     = 0xFFFD7C00,    /*   1KB: 0xFFFD7C00 - 0xFFFD7FFF */
    FLASH_CF_BLOCK_161     = 0xFFFD7800,    /*   1KB: 0xFFFD7800 - 0xFFFD7BFF */
    FLASH_CF_BLOCK_162     = 0xFFFD7400,    /*   1KB: 0xFFFD7400 - 0xFFFD77FF */
    FLASH_CF_BLOCK_163     = 0xFFFD7000,    /*   1KB: 0xFFFD7000 - 0xFFFD73FF */
    FLASH_CF_BLOCK_164     = 0xFFFD6C00,    /*   1KB: 0xFFFD6C00 - 0xFFFD6FFF */
    FLASH_CF_BLOCK_165     = 0xFFFD6800,    /*   1KB: 0xFFFD6800 - 0xFFFD6BFF */
    FLASH_CF_BLOCK_166     = 0xFFFD6400,    /*   1KB: 0xFFFD6400 - 0xFFFD67FF */
    FLASH_CF_BLOCK_167     = 0xFFFD6000,    /*   1KB: 0xFFFD6000 - 0xFFFD63FF */
    FLASH_CF_BLOCK_168     = 0xFFFD5C00,    /*   1KB: 0xFFFD5C00 - 0xFFFD5FFF */
    FLASH_CF_BLOCK_169     = 0xFFFD5800,    /*   1KB: 0xFFFD5800 - 0xFFFD5BFF */
    FLASH_CF_BLOCK_170     = 0xFFFD5400,    /*   1KB: 0xFFFD5400 - 0xFFFD57FF */
    FLASH_CF_BLOCK_171     = 0xFFFD5000,    /*   1KB: 0xFFFD5000 - 0xFFFD53FF */
    FLASH_CF_BLOCK_172     = 0xFFFD4C00,    /*   1KB: 0xFFFD4C00 - 0xFFFD4FFF */
    FLASH_CF_BLOCK_173     = 0xFFFD4800,    /*   1KB: 0xFFFD4800 - 0xFFFD4BFF */
    FLASH_CF_BLOCK_174     = 0xFFFD4400,    /*   1KB: 0xFFFD4400 - 0xFFFD47FF */
    FLASH_CF_BLOCK_175     = 0xFFFD4000,    /*   1KB: 0xFFFD4000 - 0xFFFD43FF */
    FLASH_CF_BLOCK_176     = 0xFFFD3C00,    /*   1KB: 0xFFFD3C00 - 0xFFFD3FFF */
    FLASH_CF_BLOCK_177     = 0xFFFD3800,    /*   1KB: 0xFFFD3800 - 0xFFFD3BFF */
    FLASH_CF_BLOCK_178     = 0xFFFD3400,    /*   1KB: 0xFFFD3400 - 0xFFFD37FF */
    FLASH_CF_BLOCK_179     = 0xFFFD3000,    /*   1KB: 0xFFFD3000 - 0xFFFD33FF */
    FLASH_CF_BLOCK_180     = 0xFFFD2C00,    /*   1KB: 0xFFFD2C00 - 0xFFFD2FFF */
    FLASH_CF_BLOCK_181     = 0xFFFD2800,    /*   1KB: 0xFFFD2800 - 0xFFFD2BFF */
    FLASH_CF_BLOCK_182     = 0xFFFD2400,    /*   1KB: 0xFFFD2400 - 0xFFFD27FF */
    FLASH_CF_BLOCK_183     = 0xFFFD2000,    /*   1KB: 0xFFFD2000 - 0xFFFD23FF */
    FLASH_CF_BLOCK_184     = 0xFFFD1C00,    /*   1KB: 0xFFFD1C00 - 0xFFFD1FFF */
    FLASH_CF_BLOCK_185     = 0xFFFD1800,    /*   1KB: 0xFFFD1800 - 0xFFFD1BFF */
    FLASH_CF_BLOCK_186     = 0xFFFD1400,    /*   1KB: 0xFFFD1400 - 0xFFFD17FF */
    FLASH_CF_BLOCK_187     = 0xFFFD1000,    /*   1KB: 0xFFFD1000 - 0xFFFD13FF */
    FLASH_CF_BLOCK_188     = 0xFFFD0C00,    /*   1KB: 0xFFFD0C00 - 0xFFFD0FFF */
    FLASH_CF_BLOCK_189     = 0xFFFD0800,    /*   1KB: 0xFFFD0800 - 0xFFFD0BFF */
    FLASH_CF_BLOCK_190     = 0xFFFD0400,    /*   1KB: 0xFFFD0400 - 0xFFFD07FF */
    FLASH_CF_BLOCK_191     = 0xFFFD0000,    /*   1KB: 0xFFFD0000 - 0xFFFD03FF */
    FLASH_CF_BLOCK_192     = 0xFFFCFC00,    /*   1KB: 0xFFFCFC00 - 0xFFFCFFFF */
    FLASH_CF_BLOCK_193     = 0xFFFCF800,    /*   1KB: 0xFFFCF800 - 0xFFFCFBFF */
    FLASH_CF_BLOCK_194     = 0xFFFCF400,    /*   1KB: 0xFFFCF400 - 0xFFFCF7FF */
    FLASH_CF_BLOCK_195     = 0xFFFCF000,    /*   1KB: 0xFFFCF000 - 0xFFFCF3FF */
    FLASH_CF_BLOCK_196     = 0xFFFCEC00,    /*   1KB: 0xFFFCEC00 - 0xFFFCEFFF */
    FLASH_CF_BLOCK_197     = 0xFFFCE800,    /*   1KB: 0xFFFCE800 - 0xFFFCEBFF */
    FLASH_CF_BLOCK_198     = 0xFFFCE400,    /*   1KB: 0xFFFCE400 - 0xFFFCE7FF */
    FLASH_CF_BLOCK_199     = 0xFFFCE000,    /*   1KB: 0xFFFCE000 - 0xFFFCE3FF */
    FLASH_CF_BLOCK_200     = 0xFFFCDC00,    /*   1KB: 0xFFFCDC00 - 0xFFFCDFFF */
    FLASH_CF_BLOCK_201     = 0xFFFCD800,    /*   1KB: 0xFFFCD800 - 0xFFFCDBFF */
    FLASH_CF_BLOCK_202     = 0xFFFCD400,    /*   1KB: 0xFFFCD400 - 0xFFFCD7FF */
    FLASH_CF_BLOCK_203     = 0xFFFCD000,    /*   1KB: 0xFFFCD000 - 0xFFFCD3FF */
    FLASH_CF_BLOCK_204     = 0xFFFCCC00,    /*   1KB: 0xFFFCCC00 - 0xFFFCCFFF */
    FLASH_CF_BLOCK_205     = 0xFFFCC800,    /*   1KB: 0xFFFCC800 - 0xFFFCCBFF */
    FLASH_CF_BLOCK_206     = 0xFFFCC400,    /*   1KB: 0xFFFCC400 - 0xFFFCC7FF */
    FLASH_CF_BLOCK_207     = 0xFFFCC000,    /*   1KB: 0xFFFCC000 - 0xFFFCC3FF */
    FLASH_CF_BLOCK_208     = 0xFFFCBC00,    /*   1KB: 0xFFFCBC00 - 0xFFFCBFFF */
    FLASH_CF_BLOCK_209     = 0xFFFCB800,    /*   1KB: 0xFFFCB800 - 0xFFFCBBFF */
    FLASH_CF_BLOCK_210     = 0xFFFCB400,    /*   1KB: 0xFFFCB400 - 0xFFFCB7FF */
    FLASH_CF_BLOCK_211     = 0xFFFCB000,    /*   1KB: 0xFFFCB000 - 0xFFFCB3FF */
    FLASH_CF_BLOCK_212     = 0xFFFCAC00,    /*   1KB: 0xFFFCAC00 - 0xFFFCAFFF */
    FLASH_CF_BLOCK_213     = 0xFFFCA800,    /*   1KB: 0xFFFCA800 - 0xFFFCABFF */
    FLASH_CF_BLOCK_214     = 0xFFFCA400,    /*   1KB: 0xFFFCA400 - 0xFFFCA7FF */
    FLASH_CF_BLOCK_215     = 0xFFFCA000,    /*   1KB: 0xFFFCA000 - 0xFFFCA3FF */
    FLASH_CF_BLOCK_216     = 0xFFFC9C00,    /*   1KB: 0xFFFC9C00 - 0xFFFC9FFF */
    FLASH_CF_BLOCK_217     = 0xFFFC9800,    /*   1KB: 0xFFFC9800 - 0xFFFC9BFF */
    FLASH_CF_BLOCK_218     = 0xFFFC9400,    /*   1KB: 0xFFFC9400 - 0xFFFC97FF */
    FLASH_CF_BLOCK_219     = 0xFFFC9000,    /*   1KB: 0xFFFC9000 - 0xFFFC93FF */
    FLASH_CF_BLOCK_220     = 0xFFFC8C00,    /*   1KB: 0xFFFC8C00 - 0xFFFC8FFF */
    FLASH_CF_BLOCK_221     = 0xFFFC8800,    /*   1KB: 0xFFFC8800 - 0xFFFC8BFF */
    FLASH_CF_BLOCK_222     = 0xFFFC8400,    /*   1KB: 0xFFFC8400 - 0xFFFC87FF */
    FLASH_CF_BLOCK_223     = 0xFFFC8000,    /*   1KB: 0xFFFC8000 - 0xFFFC83FF */
    FLASH_CF_BLOCK_224     = 0xFFFC7C00,    /*   1KB: 0xFFFC7C00 - 0xFFFC7FFF */
    FLASH_CF_BLOCK_225     = 0xFFFC7800,    /*   1KB: 0xFFFC7800 - 0xFFFC7BFF */
    FLASH_CF_BLOCK_226     = 0xFFFC7400,    /*   1KB: 0xFFFC7400 - 0xFFFC77FF */
    FLASH_CF_BLOCK_227     = 0xFFFC7000,    /*   1KB: 0xFFFC7000 - 0xFFFC73FF */
    FLASH_CF_BLOCK_228     = 0xFFFC6C00,    /*   1KB: 0xFFFC6C00 - 0xFFFC6FFF */
    FLASH_CF_BLOCK_229     = 0xFFFC6800,    /*   1KB: 0xFFFC6800 - 0xFFFC6BFF */
    FLASH_CF_BLOCK_230     = 0xFFFC6400,    /*   1KB: 0xFFFC6400 - 0xFFFC67FF */
    FLASH_CF_BLOCK_231     = 0xFFFC6000,    /*   1KB: 0xFFFC6000 - 0xFFFC63FF */
    FLASH_CF_BLOCK_232     = 0xFFFC5C00,    /*   1KB: 0xFFFC5C00 - 0xFFFC5FFF */
    FLASH_CF_BLOCK_233     = 0xFFFC5800,    /*   1KB: 0xFFFC5800 - 0xFFFC5BFF */
    FLASH_CF_BLOCK_234     = 0xFFFC5400,    /*   1KB: 0xFFFC5400 - 0xFFFC57FF */
    FLASH_CF_BLOCK_235     = 0xFFFC5000,    /*   1KB: 0xFFFC5000 - 0xFFFC53FF */
    FLASH_CF_BLOCK_236     = 0xFFFC4C00,    /*   1KB: 0xFFFC4C00 - 0xFFFC4FFF */
    FLASH_CF_BLOCK_237     = 0xFFFC4800,    /*   1KB: 0xFFFC4800 - 0xFFFC4BFF */
    FLASH_CF_BLOCK_238     = 0xFFFC4400,    /*   1KB: 0xFFFC4400 - 0xFFFC47FF */
    FLASH_CF_BLOCK_239     = 0xFFFC4000,    /*   1KB: 0xFFFC4000 - 0xFFFC43FF */
    FLASH_CF_BLOCK_240     = 0xFFFC3C00,    /*   1KB: 0xFFFC3C00 - 0xFFFC3FFF */
    FLASH_CF_BLOCK_241     = 0xFFFC3800,    /*   1KB: 0xFFFC3800 - 0xFFFC3BFF */
    FLASH_CF_BLOCK_242     = 0xFFFC3400,    /*   1KB: 0xFFFC3400 - 0xFFFC37FF */
    FLASH_CF_BLOCK_243     = 0xFFFC3000,    /*   1KB: 0xFFFC3000 - 0xFFFC33FF */
    FLASH_CF_BLOCK_244     = 0xFFFC2C00,    /*   1KB: 0xFFFC2C00 - 0xFFFC2FFF */
    FLASH_CF_BLOCK_245     = 0xFFFC2800,    /*   1KB: 0xFFFC2800 - 0xFFFC2BFF */
    FLASH_CF_BLOCK_246     = 0xFFFC2400,    /*   1KB: 0xFFFC2400 - 0xFFFC27FF */
    FLASH_CF_BLOCK_247     = 0xFFFC2000,    /*   1KB: 0xFFFC2000 - 0xFFFC23FF */
    FLASH_CF_BLOCK_248     = 0xFFFC1C00,    /*   1KB: 0xFFFC1C00 - 0xFFFC1FFF */
    FLASH_CF_BLOCK_249     = 0xFFFC1800,    /*   1KB: 0xFFFC1800 - 0xFFFC1BFF */
    FLASH_CF_BLOCK_250     = 0xFFFC1400,    /*   1KB: 0xFFFC1400 - 0xFFFC17FF */
    FLASH_CF_BLOCK_251     = 0xFFFC1000,    /*   1KB: 0xFFFC1000 - 0xFFFC13FF */
    FLASH_CF_BLOCK_252     = 0xFFFC0C00,    /*   1KB: 0xFFFC0C00 - 0xFFFC0FFF */
    FLASH_CF_BLOCK_253     = 0xFFFC0800,    /*   1KB: 0xFFFC0800 - 0xFFFC0BFF */
    FLASH_CF_BLOCK_254     = 0xFFFC0400,    /*   1KB: 0xFFFC0400 - 0xFFFC07FF */
    FLASH_CF_BLOCK_255     = 0xFFFC0000,    /*   1KB: 0xFFFC0000 - 0xFFFC03FF */
#if   MCU_CFG_PART_MEMORY_SIZE == 0x6   //   '6' parts 256KB ROM
    FLASH_CF_BLOCK_INVALID = (FLASH_CF_BLOCK_255 - 1),
#else
    FLASH_CF_BLOCK_256     = 0xFFFBFC00,    /*   1KB: 0xFFFBFC00 - 0xFFFBFFFF */
    FLASH_CF_BLOCK_257     = 0xFFFBF800,    /*   1KB: 0xFFFBF800 - 0xFFFBFBFF */
    FLASH_CF_BLOCK_258     = 0xFFFBF400,    /*   1KB: 0xFFFBF400 - 0xFFFBF7FF */
    FLASH_CF_BLOCK_259     = 0xFFFBF000,    /*   1KB: 0xFFFBF000 - 0xFFFBF3FF */
    FLASH_CF_BLOCK_260     = 0xFFFBEC00,    /*   1KB: 0xFFFBEC00 - 0xFFFBEFFF */
    FLASH_CF_BLOCK_261     = 0xFFFBE800,    /*   1KB: 0xFFFBE800 - 0xFFFBEBFF */
    FLASH_CF_BLOCK_262     = 0xFFFBE400,    /*   1KB: 0xFFFBE400 - 0xFFFBE7FF */
    FLASH_CF_BLOCK_263     = 0xFFFBE000,    /*   1KB: 0xFFFBE000 - 0xFFFBE3FF */
    FLASH_CF_BLOCK_264     = 0xFFFBDC00,    /*   1KB: 0xFFFBDC00 - 0xFFFBDFFF */
    FLASH_CF_BLOCK_265     = 0xFFFBD800,    /*   1KB: 0xFFFBD800 - 0xFFFBDBFF */
    FLASH_CF_BLOCK_266     = 0xFFFBD400,    /*   1KB: 0xFFFBD400 - 0xFFFBD7FF */
    FLASH_CF_BLOCK_267     = 0xFFFBD000,    /*   1KB: 0xFFFBD000 - 0xFFFBD3FF */
    FLASH_CF_BLOCK_268     = 0xFFFBCC00,    /*   1KB: 0xFFFBCC00 - 0xFFFBCFFF */
    FLASH_CF_BLOCK_269     = 0xFFFBC800,    /*   1KB: 0xFFFBC800 - 0xFFFBCBFF */
    FLASH_CF_BLOCK_270     = 0xFFFBC400,    /*   1KB: 0xFFFBC400 - 0xFFFBC7FF */
    FLASH_CF_BLOCK_271     = 0xFFFBC000,    /*   1KB: 0xFFFBC000 - 0xFFFBC3FF */
    FLASH_CF_BLOCK_272     = 0xFFFBBC00,    /*   1KB: 0xFFFBBC00 - 0xFFFBBFFF */
    FLASH_CF_BLOCK_273     = 0xFFFBB800,    /*   1KB: 0xFFFBB800 - 0xFFFBBBFF */
    FLASH_CF_BLOCK_274     = 0xFFFBB400,    /*   1KB: 0xFFFBB400 - 0xFFFBB7FF */
    FLASH_CF_BLOCK_275     = 0xFFFBB000,    /*   1KB: 0xFFFBB000 - 0xFFFBB3FF */
    FLASH_CF_BLOCK_276     = 0xFFFBAC00,    /*   1KB: 0xFFFBAC00 - 0xFFFBAFFF */
    FLASH_CF_BLOCK_277     = 0xFFFBA800,    /*   1KB: 0xFFFBA800 - 0xFFFBABFF */
    FLASH_CF_BLOCK_278     = 0xFFFBA400,    /*   1KB: 0xFFFBA400 - 0xFFFBA7FF */
    FLASH_CF_BLOCK_279     = 0xFFFBA000,    /*   1KB: 0xFFFBA000 - 0xFFFBA3FF */
    FLASH_CF_BLOCK_280     = 0xFFFB9C00,    /*   1KB: 0xFFFB9C00 - 0xFFFB9FFF */
    FLASH_CF_BLOCK_281     = 0xFFFB9800,    /*   1KB: 0xFFFB9800 - 0xFFFB9BFF */
    FLASH_CF_BLOCK_282     = 0xFFFB9400,    /*   1KB: 0xFFFB9400 - 0xFFFB97FF */
    FLASH_CF_BLOCK_283     = 0xFFFB9000,    /*   1KB: 0xFFFB9000 - 0xFFFB93FF */
    FLASH_CF_BLOCK_284     = 0xFFFB8C00,    /*   1KB: 0xFFFB8C00 - 0xFFFB8FFF */
    FLASH_CF_BLOCK_285     = 0xFFFB8800,    /*   1KB: 0xFFFB8800 - 0xFFFB8BFF */
    FLASH_CF_BLOCK_286     = 0xFFFB8400,    /*   1KB: 0xFFFB8400 - 0xFFFB87FF */
    FLASH_CF_BLOCK_287     = 0xFFFB8000,    /*   1KB: 0xFFFB8000 - 0xFFFB83FF */
    FLASH_CF_BLOCK_288     = 0xFFFB7C00,    /*   1KB: 0xFFFB7C00 - 0xFFFB7FFF */
    FLASH_CF_BLOCK_289     = 0xFFFB7800,    /*   1KB: 0xFFFB7800 - 0xFFFB7BFF */
    FLASH_CF_BLOCK_290     = 0xFFFB7400,    /*   1KB: 0xFFFB7400 - 0xFFFB77FF */
    FLASH_CF_BLOCK_291     = 0xFFFB7000,    /*   1KB: 0xFFFB7000 - 0xFFFB73FF */
    FLASH_CF_BLOCK_292     = 0xFFFB6C00,    /*   1KB: 0xFFFB6C00 - 0xFFFB6FFF */
    FLASH_CF_BLOCK_293     = 0xFFFB6800,    /*   1KB: 0xFFFB6800 - 0xFFFB6BFF */
    FLASH_CF_BLOCK_294     = 0xFFFB6400,    /*   1KB: 0xFFFB6400 - 0xFFFB67FF */
    FLASH_CF_BLOCK_295     = 0xFFFB6000,    /*   1KB: 0xFFFB6000 - 0xFFFB63FF */
    FLASH_CF_BLOCK_296     = 0xFFFB5C00,    /*   1KB: 0xFFFB5C00 - 0xFFFB5FFF */
    FLASH_CF_BLOCK_297     = 0xFFFB5800,    /*   1KB: 0xFFFB5800 - 0xFFFB5BFF */
    FLASH_CF_BLOCK_298     = 0xFFFB5400,    /*   1KB: 0xFFFB5400 - 0xFFFB57FF */
    FLASH_CF_BLOCK_299     = 0xFFFB5000,    /*   1KB: 0xFFFB5000 - 0xFFFB53FF */
    FLASH_CF_BLOCK_300     = 0xFFFB4C00,    /*   1KB: 0xFFFB4C00 - 0xFFFB4FFF */
    FLASH_CF_BLOCK_301     = 0xFFFB4800,    /*   1KB: 0xFFFB4800 - 0xFFFB4BFF */
    FLASH_CF_BLOCK_302     = 0xFFFB4400,    /*   1KB: 0xFFFB4400 - 0xFFFB47FF */
    FLASH_CF_BLOCK_303     = 0xFFFB4000,    /*   1KB: 0xFFFB4000 - 0xFFFB43FF */
    FLASH_CF_BLOCK_304     = 0xFFFB3C00,    /*   1KB: 0xFFFB3C00 - 0xFFFB3FFF */
    FLASH_CF_BLOCK_305     = 0xFFFB3800,    /*   1KB: 0xFFFB3800 - 0xFFFB3BFF */
    FLASH_CF_BLOCK_306     = 0xFFFB3400,    /*   1KB: 0xFFFB3400 - 0xFFFB37FF */
    FLASH_CF_BLOCK_307     = 0xFFFB3000,    /*   1KB: 0xFFFB3000 - 0xFFFB33FF */
    FLASH_CF_BLOCK_308     = 0xFFFB2C00,    /*   1KB: 0xFFFB2C00 - 0xFFFB2FFF */
    FLASH_CF_BLOCK_309     = 0xFFFB2800,    /*   1KB: 0xFFFB2800 - 0xFFFB2BFF */
    FLASH_CF_BLOCK_310     = 0xFFFB2400,    /*   1KB: 0xFFFB2400 - 0xFFFB27FF */
    FLASH_CF_BLOCK_311     = 0xFFFB2000,    /*   1KB: 0xFFFB2000 - 0xFFFB23FF */
    FLASH_CF_BLOCK_312     = 0xFFFB1C00,    /*   1KB: 0xFFFB1C00 - 0xFFFB1FFF */
    FLASH_CF_BLOCK_313     = 0xFFFB1800,    /*   1KB: 0xFFFB1800 - 0xFFFB1BFF */
    FLASH_CF_BLOCK_314     = 0xFFFB1400,    /*   1KB: 0xFFFB1400 - 0xFFFB17FF */
    FLASH_CF_BLOCK_315     = 0xFFFB1000,    /*   1KB: 0xFFFB1000 - 0xFFFB13FF */
    FLASH_CF_BLOCK_316     = 0xFFFB0C00,    /*   1KB: 0xFFFB0C00 - 0xFFFB0FFF */
    FLASH_CF_BLOCK_317     = 0xFFFB0800,    /*   1KB: 0xFFFB0800 - 0xFFFB0BFF */
    FLASH_CF_BLOCK_318     = 0xFFFB0400,    /*   1KB: 0xFFFB0400 - 0xFFFB07FF */
    FLASH_CF_BLOCK_319     = 0xFFFB0000,    /*   1KB: 0xFFFB0000 - 0xFFFB03FF */
    FLASH_CF_BLOCK_320     = 0xFFFAFC00,    /*   1KB: 0xFFFAFC00 - 0xFFFAFFFF */
    FLASH_CF_BLOCK_321     = 0xFFFAF800,    /*   1KB: 0xFFFAF800 - 0xFFFAFBFF */
    FLASH_CF_BLOCK_322     = 0xFFFAF400,    /*   1KB: 0xFFFAF400 - 0xFFFAF7FF */
    FLASH_CF_BLOCK_323     = 0xFFFAF000,    /*   1KB: 0xFFFAF000 - 0xFFFAF3FF */
    FLASH_CF_BLOCK_324     = 0xFFFAEC00,    /*   1KB: 0xFFFAEC00 - 0xFFFAEFFF */
    FLASH_CF_BLOCK_325     = 0xFFFAE800,    /*   1KB: 0xFFFAE800 - 0xFFFAEBFF */
    FLASH_CF_BLOCK_326     = 0xFFFAE400,    /*   1KB: 0xFFFAE400 - 0xFFFAE7FF */
    FLASH_CF_BLOCK_327     = 0xFFFAE000,    /*   1KB: 0xFFFAE000 - 0xFFFAE3FF */
    FLASH_CF_BLOCK_328     = 0xFFFADC00,    /*   1KB: 0xFFFADC00 - 0xFFFADFFF */
    FLASH_CF_BLOCK_329     = 0xFFFAD800,    /*   1KB: 0xFFFAD800 - 0xFFFADBFF */
    FLASH_CF_BLOCK_330     = 0xFFFAD400,    /*   1KB: 0xFFFAD400 - 0xFFFAD7FF */
    FLASH_CF_BLOCK_331     = 0xFFFAD000,    /*   1KB: 0xFFFAD000 - 0xFFFAD3FF */
    FLASH_CF_BLOCK_332     = 0xFFFACC00,    /*   1KB: 0xFFFACC00 - 0xFFFACFFF */
    FLASH_CF_BLOCK_333     = 0xFFFAC800,    /*   1KB: 0xFFFAC800 - 0xFFFACBFF */
    FLASH_CF_BLOCK_334     = 0xFFFAC400,    /*   1KB: 0xFFFAC400 - 0xFFFAC7FF */
    FLASH_CF_BLOCK_335     = 0xFFFAC000,    /*   1KB: 0xFFFAC000 - 0xFFFAC3FF */
    FLASH_CF_BLOCK_336     = 0xFFFABC00,    /*   1KB: 0xFFFABC00 - 0xFFFABFFF */
    FLASH_CF_BLOCK_337     = 0xFFFAB800,    /*   1KB: 0xFFFAB800 - 0xFFFABBFF */
    FLASH_CF_BLOCK_338     = 0xFFFAB400,    /*   1KB: 0xFFFAB400 - 0xFFFAB7FF */
    FLASH_CF_BLOCK_339     = 0xFFFAB000,    /*   1KB: 0xFFFAB000 - 0xFFFAB3FF */
    FLASH_CF_BLOCK_340     = 0xFFFAAC00,    /*   1KB: 0xFFFAAC00 - 0xFFFAAFFF */
    FLASH_CF_BLOCK_341     = 0xFFFAA800,    /*   1KB: 0xFFFAA800 - 0xFFFAABFF */
    FLASH_CF_BLOCK_342     = 0xFFFAA400,    /*   1KB: 0xFFFAA400 - 0xFFFAA7FF */
    FLASH_CF_BLOCK_343     = 0xFFFAA000,    /*   1KB: 0xFFFAA000 - 0xFFFAA3FF */
    FLASH_CF_BLOCK_344     = 0xFFFA9C00,    /*   1KB: 0xFFFA9C00 - 0xFFFA9FFF */
    FLASH_CF_BLOCK_345     = 0xFFFA9800,    /*   1KB: 0xFFFA9800 - 0xFFFA9BFF */
    FLASH_CF_BLOCK_346     = 0xFFFA9400,    /*   1KB: 0xFFFA9400 - 0xFFFA97FF */
    FLASH_CF_BLOCK_347     = 0xFFFA9000,    /*   1KB: 0xFFFA9000 - 0xFFFA93FF */
    FLASH_CF_BLOCK_348     = 0xFFFA8C00,    /*   1KB: 0xFFFA8C00 - 0xFFFA8FFF */
    FLASH_CF_BLOCK_349     = 0xFFFA8800,    /*   1KB: 0xFFFA8800 - 0xFFFA8BFF */
    FLASH_CF_BLOCK_350     = 0xFFFA8400,    /*   1KB: 0xFFFA8400 - 0xFFFA87FF */
    FLASH_CF_BLOCK_351     = 0xFFFA8000,    /*   1KB: 0xFFFA8000 - 0xFFFA83FF */
    FLASH_CF_BLOCK_352     = 0xFFFA7C00,    /*   1KB: 0xFFFA7C00 - 0xFFFA7FFF */
    FLASH_CF_BLOCK_353     = 0xFFFA7800,    /*   1KB: 0xFFFA7800 - 0xFFFA7BFF */
    FLASH_CF_BLOCK_354     = 0xFFFA7400,    /*   1KB: 0xFFFA7400 - 0xFFFA77FF */
    FLASH_CF_BLOCK_355     = 0xFFFA7000,    /*   1KB: 0xFFFA7000 - 0xFFFA73FF */
    FLASH_CF_BLOCK_356     = 0xFFFA6C00,    /*   1KB: 0xFFFA6C00 - 0xFFFA6FFF */
    FLASH_CF_BLOCK_357     = 0xFFFA6800,    /*   1KB: 0xFFFA6800 - 0xFFFA6BFF */
    FLASH_CF_BLOCK_358     = 0xFFFA6400,    /*   1KB: 0xFFFA6400 - 0xFFFA67FF */
    FLASH_CF_BLOCK_359     = 0xFFFA6000,    /*   1KB: 0xFFFA6000 - 0xFFFA63FF */
    FLASH_CF_BLOCK_360     = 0xFFFA5C00,    /*   1KB: 0xFFFA5C00 - 0xFFFA5FFF */
    FLASH_CF_BLOCK_361     = 0xFFFA5800,    /*   1KB: 0xFFFA5800 - 0xFFFA5BFF */
    FLASH_CF_BLOCK_362     = 0xFFFA5400,    /*   1KB: 0xFFFA5400 - 0xFFFA57FF */
    FLASH_CF_BLOCK_363     = 0xFFFA5000,    /*   1KB: 0xFFFA5000 - 0xFFFA53FF */
    FLASH_CF_BLOCK_364     = 0xFFFA4C00,    /*   1KB: 0xFFFA4C00 - 0xFFFA4FFF */
    FLASH_CF_BLOCK_365     = 0xFFFA4800,    /*   1KB: 0xFFFA4800 - 0xFFFA4BFF */
    FLASH_CF_BLOCK_366     = 0xFFFA4400,    /*   1KB: 0xFFFA4400 - 0xFFFA47FF */
    FLASH_CF_BLOCK_367     = 0xFFFA4000,    /*   1KB: 0xFFFA4000 - 0xFFFA43FF */
    FLASH_CF_BLOCK_368     = 0xFFFA3C00,    /*   1KB: 0xFFFA3C00 - 0xFFFA3FFF */
    FLASH_CF_BLOCK_369     = 0xFFFA3800,    /*   1KB: 0xFFFA3800 - 0xFFFA3BFF */
    FLASH_CF_BLOCK_370     = 0xFFFA3400,    /*   1KB: 0xFFFA3400 - 0xFFFA37FF */
    FLASH_CF_BLOCK_371     = 0xFFFA3000,    /*   1KB: 0xFFFA3000 - 0xFFFA33FF */
    FLASH_CF_BLOCK_372     = 0xFFFA2C00,    /*   1KB: 0xFFFA2C00 - 0xFFFA2FFF */
    FLASH_CF_BLOCK_373     = 0xFFFA2800,    /*   1KB: 0xFFFA2800 - 0xFFFA2BFF */
    FLASH_CF_BLOCK_374     = 0xFFFA2400,    /*   1KB: 0xFFFA2400 - 0xFFFA27FF */
    FLASH_CF_BLOCK_375     = 0xFFFA2000,    /*   1KB: 0xFFFA2000 - 0xFFFA23FF */
    FLASH_CF_BLOCK_376     = 0xFFFA1C00,    /*   1KB: 0xFFFA1C00 - 0xFFFA1FFF */
    FLASH_CF_BLOCK_377     = 0xFFFA1800,    /*   1KB: 0xFFFA1800 - 0xFFFA1BFF */
    FLASH_CF_BLOCK_378     = 0xFFFA1400,    /*   1KB: 0xFFFA1400 - 0xFFFA17FF */
    FLASH_CF_BLOCK_379     = 0xFFFA1000,    /*   1KB: 0xFFFA1000 - 0xFFFA13FF */
    FLASH_CF_BLOCK_380     = 0xFFFA0C00,    /*   1KB: 0xFFFA0C00 - 0xFFFA0FFF */
    FLASH_CF_BLOCK_381     = 0xFFFA0800,    /*   1KB: 0xFFFA0800 - 0xFFFA0BFF */
    FLASH_CF_BLOCK_382     = 0xFFFA0400,    /*   1KB: 0xFFFA0400 - 0xFFFA07FF */
    FLASH_CF_BLOCK_383     = 0xFFFA0000,    /*   1KB: 0xFFFA0000 - 0xFFFA03FF */
#if   MCU_CFG_PART_MEMORY_SIZE == 0x7   //   '7' parts 384KB ROM
    FLASH_CF_BLOCK_INVALID = (FLASH_CF_BLOCK_383 - 1),
#else
    FLASH_CF_BLOCK_384     = 0xFFF9FC00,    /*   1KB: 0xFFF9FC00 - 0xFFF9FFFF */
    FLASH_CF_BLOCK_385     = 0xFFF9F800,    /*   1KB: 0xFFF9F800 - 0xFFF9FBFF */
    FLASH_CF_BLOCK_386     = 0xFFF9F400,    /*   1KB: 0xFFF9F400 - 0xFFF9F7FF */
    FLASH_CF_BLOCK_387     = 0xFFF9F000,    /*   1KB: 0xFFF9F000 - 0xFFF9F3FF */
    FLASH_CF_BLOCK_388     = 0xFFF9EC00,    /*   1KB: 0xFFF9EC00 - 0xFFF9EFFF */
    FLASH_CF_BLOCK_389     = 0xFFF9E800,    /*   1KB: 0xFFF9E800 - 0xFFF9EBFF */
    FLASH_CF_BLOCK_390     = 0xFFF9E400,    /*   1KB: 0xFFF9E400 - 0xFFF9E7FF */
    FLASH_CF_BLOCK_391     = 0xFFF9E000,    /*   1KB: 0xFFF9E000 - 0xFFF9E3FF */
    FLASH_CF_BLOCK_392     = 0xFFF9DC00,    /*   1KB: 0xFFF9DC00 - 0xFFF9DFFF */
    FLASH_CF_BLOCK_393     = 0xFFF9D800,    /*   1KB: 0xFFF9D800 - 0xFFF9DBFF */
    FLASH_CF_BLOCK_394     = 0xFFF9D400,    /*   1KB: 0xFFF9D400 - 0xFFF9D7FF */
    FLASH_CF_BLOCK_395     = 0xFFF9D000,    /*   1KB: 0xFFF9D000 - 0xFFF9D3FF */
    FLASH_CF_BLOCK_396     = 0xFFF9CC00,    /*   1KB: 0xFFF9CC00 - 0xFFF9CFFF */
    FLASH_CF_BLOCK_397     = 0xFFF9C800,    /*   1KB: 0xFFF9C800 - 0xFFF9CBFF */
    FLASH_CF_BLOCK_398     = 0xFFF9C400,    /*   1KB: 0xFFF9C400 - 0xFFF9C7FF */
    FLASH_CF_BLOCK_399     = 0xFFF9C000,    /*   1KB: 0xFFF9C000 - 0xFFF9C3FF */
    FLASH_CF_BLOCK_400     = 0xFFF9BC00,    /*   1KB: 0xFFF9BC00 - 0xFFF9BFFF */
    FLASH_CF_BLOCK_401     = 0xFFF9B800,    /*   1KB: 0xFFF9B800 - 0xFFF9BBFF */
    FLASH_CF_BLOCK_402     = 0xFFF9B400,    /*   1KB: 0xFFF9B400 - 0xFFF9B7FF */
    FLASH_CF_BLOCK_403     = 0xFFF9B000,    /*   1KB: 0xFFF9B000 - 0xFFF9B3FF */
    FLASH_CF_BLOCK_404     = 0xFFF9AC00,    /*   1KB: 0xFFF9AC00 - 0xFFF9AFFF */
    FLASH_CF_BLOCK_405     = 0xFFF9A800,    /*   1KB: 0xFFF9A800 - 0xFFF9ABFF */
    FLASH_CF_BLOCK_406     = 0xFFF9A400,    /*   1KB: 0xFFF9A400 - 0xFFF9A7FF */
    FLASH_CF_BLOCK_407     = 0xFFF9A000,    /*   1KB: 0xFFF9A000 - 0xFFF9A3FF */
    FLASH_CF_BLOCK_408     = 0xFFF99C00,    /*   1KB: 0xFFF99C00 - 0xFFF99FFF */
    FLASH_CF_BLOCK_409     = 0xFFF99800,    /*   1KB: 0xFFF99800 - 0xFFF99BFF */
    FLASH_CF_BLOCK_410     = 0xFFF99400,    /*   1KB: 0xFFF99400 - 0xFFF997FF */
    FLASH_CF_BLOCK_411     = 0xFFF99000,    /*   1KB: 0xFFF99000 - 0xFFF993FF */
    FLASH_CF_BLOCK_412     = 0xFFF98C00,    /*   1KB: 0xFFF98C00 - 0xFFF98FFF */
    FLASH_CF_BLOCK_413     = 0xFFF98800,    /*   1KB: 0xFFF98800 - 0xFFF98BFF */
    FLASH_CF_BLOCK_414     = 0xFFF98400,    /*   1KB: 0xFFF98400 - 0xFFF987FF */
    FLASH_CF_BLOCK_415     = 0xFFF98000,    /*   1KB: 0xFFF98000 - 0xFFF983FF */
    FLASH_CF_BLOCK_416     = 0xFFF97C00,    /*   1KB: 0xFFF97C00 - 0xFFF97FFF */
    FLASH_CF_BLOCK_417     = 0xFFF97800,    /*   1KB: 0xFFF97800 - 0xFFF97BFF */
    FLASH_CF_BLOCK_418     = 0xFFF97400,    /*   1KB: 0xFFF97400 - 0xFFF977FF */
    FLASH_CF_BLOCK_419     = 0xFFF97000,    /*   1KB: 0xFFF97000 - 0xFFF973FF */
    FLASH_CF_BLOCK_420     = 0xFFF96C00,    /*   1KB: 0xFFF96C00 - 0xFFF96FFF */
    FLASH_CF_BLOCK_421     = 0xFFF96800,    /*   1KB: 0xFFF96800 - 0xFFF96BFF */
    FLASH_CF_BLOCK_422     = 0xFFF96400,    /*   1KB: 0xFFF96400 - 0xFFF967FF */
    FLASH_CF_BLOCK_423     = 0xFFF96000,    /*   1KB: 0xFFF96000 - 0xFFF963FF */
    FLASH_CF_BLOCK_424     = 0xFFF95C00,    /*   1KB: 0xFFF95C00 - 0xFFF95FFF */
    FLASH_CF_BLOCK_425     = 0xFFF95800,    /*   1KB: 0xFFF95800 - 0xFFF95BFF */
    FLASH_CF_BLOCK_426     = 0xFFF95400,    /*   1KB: 0xFFF95400 - 0xFFF957FF */
    FLASH_CF_BLOCK_427     = 0xFFF95000,    /*   1KB: 0xFFF95000 - 0xFFF953FF */
    FLASH_CF_BLOCK_428     = 0xFFF94C00,    /*   1KB: 0xFFF94C00 - 0xFFF94FFF */
    FLASH_CF_BLOCK_429     = 0xFFF94800,    /*   1KB: 0xFFF94800 - 0xFFF94BFF */
    FLASH_CF_BLOCK_430     = 0xFFF94400,    /*   1KB: 0xFFF94400 - 0xFFF947FF */
    FLASH_CF_BLOCK_431     = 0xFFF94000,    /*   1KB: 0xFFF94000 - 0xFFF943FF */
    FLASH_CF_BLOCK_432     = 0xFFF93C00,    /*   1KB: 0xFFF93C00 - 0xFFF93FFF */
    FLASH_CF_BLOCK_433     = 0xFFF93800,    /*   1KB: 0xFFF93800 - 0xFFF93BFF */
    FLASH_CF_BLOCK_434     = 0xFFF93400,    /*   1KB: 0xFFF93400 - 0xFFF937FF */
    FLASH_CF_BLOCK_435     = 0xFFF93000,    /*   1KB: 0xFFF93000 - 0xFFF933FF */
    FLASH_CF_BLOCK_436     = 0xFFF92C00,    /*   1KB: 0xFFF92C00 - 0xFFF92FFF */
    FLASH_CF_BLOCK_437     = 0xFFF92800,    /*   1KB: 0xFFF92800 - 0xFFF92BFF */
    FLASH_CF_BLOCK_438     = 0xFFF92400,    /*   1KB: 0xFFF92400 - 0xFFF927FF */
    FLASH_CF_BLOCK_439     = 0xFFF92000,    /*   1KB: 0xFFF92000 - 0xFFF923FF */
    FLASH_CF_BLOCK_440     = 0xFFF91C00,    /*   1KB: 0xFFF91C00 - 0xFFF91FFF */
    FLASH_CF_BLOCK_441     = 0xFFF91800,    /*   1KB: 0xFFF91800 - 0xFFF91BFF */
    FLASH_CF_BLOCK_442     = 0xFFF91400,    /*   1KB: 0xFFF91400 - 0xFFF917FF */
    FLASH_CF_BLOCK_443     = 0xFFF91000,    /*   1KB: 0xFFF91000 - 0xFFF913FF */
    FLASH_CF_BLOCK_444     = 0xFFF90C00,    /*   1KB: 0xFFF90C00 - 0xFFF90FFF */
    FLASH_CF_BLOCK_445     = 0xFFF90800,    /*   1KB: 0xFFF90800 - 0xFFF90BFF */
    FLASH_CF_BLOCK_446     = 0xFFF90400,    /*   1KB: 0xFFF90400 - 0xFFF907FF */
    FLASH_CF_BLOCK_447     = 0xFFF90000,    /*   1KB: 0xFFF90000 - 0xFFF903FF */
    FLASH_CF_BLOCK_448     = 0xFFF8FC00,    /*   1KB: 0xFFF8FC00 - 0xFFF8FFFF */
    FLASH_CF_BLOCK_449     = 0xFFF8F800,    /*   1KB: 0xFFF8F800 - 0xFFF8FBFF */
    FLASH_CF_BLOCK_450     = 0xFFF8F400,    /*   1KB: 0xFFF8F400 - 0xFFF8F7FF */
    FLASH_CF_BLOCK_451     = 0xFFF8F000,    /*   1KB: 0xFFF8F000 - 0xFFF8F3FF */
    FLASH_CF_BLOCK_452     = 0xFFF8EC00,    /*   1KB: 0xFFF8EC00 - 0xFFF8EFFF */
    FLASH_CF_BLOCK_453     = 0xFFF8E800,    /*   1KB: 0xFFF8E800 - 0xFFF8EBFF */
    FLASH_CF_BLOCK_454     = 0xFFF8E400,    /*   1KB: 0xFFF8E400 - 0xFFF8E7FF */
    FLASH_CF_BLOCK_455     = 0xFFF8E000,    /*   1KB: 0xFFF8E000 - 0xFFF8E3FF */
    FLASH_CF_BLOCK_456     = 0xFFF8DC00,    /*   1KB: 0xFFF8DC00 - 0xFFF8DFFF */
    FLASH_CF_BLOCK_457     = 0xFFF8D800,    /*   1KB: 0xFFF8D800 - 0xFFF8DBFF */
    FLASH_CF_BLOCK_458     = 0xFFF8D400,    /*   1KB: 0xFFF8D400 - 0xFFF8D7FF */
    FLASH_CF_BLOCK_459     = 0xFFF8D000,    /*   1KB: 0xFFF8D000 - 0xFFF8D3FF */
    FLASH_CF_BLOCK_460     = 0xFFF8CC00,    /*   1KB: 0xFFF8CC00 - 0xFFF8CFFF */
    FLASH_CF_BLOCK_461     = 0xFFF8C800,    /*   1KB: 0xFFF8C800 - 0xFFF8CBFF */
    FLASH_CF_BLOCK_462     = 0xFFF8C400,    /*   1KB: 0xFFF8C400 - 0xFFF8C7FF */
    FLASH_CF_BLOCK_463     = 0xFFF8C000,    /*   1KB: 0xFFF8C000 - 0xFFF8C3FF */
    FLASH_CF_BLOCK_464     = 0xFFF8BC00,    /*   1KB: 0xFFF8BC00 - 0xFFF8BFFF */
    FLASH_CF_BLOCK_465     = 0xFFF8B800,    /*   1KB: 0xFFF8B800 - 0xFFF8BBFF */
    FLASH_CF_BLOCK_466     = 0xFFF8B400,    /*   1KB: 0xFFF8B400 - 0xFFF8B7FF */
    FLASH_CF_BLOCK_467     = 0xFFF8B000,    /*   1KB: 0xFFF8B000 - 0xFFF8B3FF */
    FLASH_CF_BLOCK_468     = 0xFFF8AC00,    /*   1KB: 0xFFF8AC00 - 0xFFF8AFFF */
    FLASH_CF_BLOCK_469     = 0xFFF8A800,    /*   1KB: 0xFFF8A800 - 0xFFF8ABFF */
    FLASH_CF_BLOCK_470     = 0xFFF8A400,    /*   1KB: 0xFFF8A400 - 0xFFF8A7FF */
    FLASH_CF_BLOCK_471     = 0xFFF8A000,    /*   1KB: 0xFFF8A000 - 0xFFF8A3FF */
    FLASH_CF_BLOCK_472     = 0xFFF89C00,    /*   1KB: 0xFFF89C00 - 0xFFF89FFF */
    FLASH_CF_BLOCK_473     = 0xFFF89800,    /*   1KB: 0xFFF89800 - 0xFFF89BFF */
    FLASH_CF_BLOCK_474     = 0xFFF89400,    /*   1KB: 0xFFF89400 - 0xFFF897FF */
    FLASH_CF_BLOCK_475     = 0xFFF89000,    /*   1KB: 0xFFF89000 - 0xFFF893FF */
    FLASH_CF_BLOCK_476     = 0xFFF88C00,    /*   1KB: 0xFFF88C00 - 0xFFF88FFF */
    FLASH_CF_BLOCK_477     = 0xFFF88800,    /*   1KB: 0xFFF88800 - 0xFFF88BFF */
    FLASH_CF_BLOCK_478     = 0xFFF88400,    /*   1KB: 0xFFF88400 - 0xFFF887FF */
    FLASH_CF_BLOCK_479     = 0xFFF88000,    /*   1KB: 0xFFF88000 - 0xFFF883FF */
    FLASH_CF_BLOCK_480     = 0xFFF87C00,    /*   1KB: 0xFFF87C00 - 0xFFF87FFF */
    FLASH_CF_BLOCK_481     = 0xFFF87800,    /*   1KB: 0xFFF87800 - 0xFFF87BFF */
    FLASH_CF_BLOCK_482     = 0xFFF87400,    /*   1KB: 0xFFF87400 - 0xFFF877FF */
    FLASH_CF_BLOCK_483     = 0xFFF87000,    /*   1KB: 0xFFF87000 - 0xFFF873FF */
    FLASH_CF_BLOCK_484     = 0xFFF86C00,    /*   1KB: 0xFFF86C00 - 0xFFF86FFF */
    FLASH_CF_BLOCK_485     = 0xFFF86800,    /*   1KB: 0xFFF86800 - 0xFFF86BFF */
    FLASH_CF_BLOCK_486     = 0xFFF86400,    /*   1KB: 0xFFF86400 - 0xFFF867FF */
    FLASH_CF_BLOCK_487     = 0xFFF86000,    /*   1KB: 0xFFF86000 - 0xFFF863FF */
    FLASH_CF_BLOCK_488     = 0xFFF85C00,    /*   1KB: 0xFFF85C00 - 0xFFF85FFF */
    FLASH_CF_BLOCK_489     = 0xFFF85800,    /*   1KB: 0xFFF85800 - 0xFFF85BFF */
    FLASH_CF_BLOCK_490     = 0xFFF85400,    /*   1KB: 0xFFF85400 - 0xFFF857FF */
    FLASH_CF_BLOCK_491     = 0xFFF85000,    /*   1KB: 0xFFF85000 - 0xFFF853FF */
    FLASH_CF_BLOCK_492     = 0xFFF84C00,    /*   1KB: 0xFFF84C00 - 0xFFF84FFF */
    FLASH_CF_BLOCK_493     = 0xFFF84800,    /*   1KB: 0xFFF84800 - 0xFFF84BFF */
    FLASH_CF_BLOCK_494     = 0xFFF84400,    /*   1KB: 0xFFF84400 - 0xFFF847FF */
    FLASH_CF_BLOCK_495     = 0xFFF84000,    /*   1KB: 0xFFF84000 - 0xFFF843FF */
    FLASH_CF_BLOCK_496     = 0xFFF83C00,    /*   1KB: 0xFFF83C00 - 0xFFF83FFF */
    FLASH_CF_BLOCK_497     = 0xFFF83800,    /*   1KB: 0xFFF83800 - 0xFFF83BFF */
    FLASH_CF_BLOCK_498     = 0xFFF83400,    /*   1KB: 0xFFF83400 - 0xFFF837FF */
    FLASH_CF_BLOCK_499     = 0xFFF83000,    /*   1KB: 0xFFF83000 - 0xFFF833FF */
    FLASH_CF_BLOCK_500     = 0xFFF82C00,    /*   1KB: 0xFFF82C00 - 0xFFF82FFF */
    FLASH_CF_BLOCK_501     = 0xFFF82800,    /*   1KB: 0xFFF82800 - 0xFFF82BFF */
    FLASH_CF_BLOCK_502     = 0xFFF82400,    /*   1KB: 0xFFF82400 - 0xFFF827FF */
    FLASH_CF_BLOCK_503     = 0xFFF82000,    /*   1KB: 0xFFF82000 - 0xFFF823FF */
    FLASH_CF_BLOCK_504     = 0xFFF81C00,    /*   1KB: 0xFFF81C00 - 0xFFF81FFF */
    FLASH_CF_BLOCK_505     = 0xFFF81800,    /*   1KB: 0xFFF81800 - 0xFFF81BFF */
    FLASH_CF_BLOCK_506     = 0xFFF81400,    /*   1KB: 0xFFF81400 - 0xFFF817FF */
    FLASH_CF_BLOCK_507     = 0xFFF81000,    /*   1KB: 0xFFF81000 - 0xFFF813FF */
    FLASH_CF_BLOCK_508     = 0xFFF80C00,    /*   1KB: 0xFFF80C00 - 0xFFF80FFF */
    FLASH_CF_BLOCK_509     = 0xFFF80800,    /*   1KB: 0xFFF80800 - 0xFFF80BFF */
    FLASH_CF_BLOCK_510     = 0xFFF80400,    /*   1KB: 0xFFF80400 - 0xFFF807FF */
    FLASH_CF_BLOCK_511     = 0xFFF80000,    /*   1KB: 0xFFF80000 - 0xFFF803FF */
    FLASH_CF_BLOCK_INVALID = (FLASH_CF_BLOCK_511 - 1),
#endif
#endif
#endif
#endif
    FLASH_DF_BLOCK_0       = 0x00100000,    /*   1KB: 0x00100000 - 0x001003ff */
    FLASH_DF_BLOCK_1       = 0x00100400,    /*   1KB: 0x00100400 - 0x001007ff */
    FLASH_DF_BLOCK_2       = 0x00100800,    /*   1KB: 0x00100800 - 0x00100bff */
    FLASH_DF_BLOCK_3       = 0x00100C00,    /*   1KB: 0x00100C00 - 0x00100fff */
    FLASH_DF_BLOCK_4       = 0x00101000,    /*   1KB: 0x00101000 - 0x001013ff */
    FLASH_DF_BLOCK_5       = 0x00101400,    /*   1KB: 0x00101400 - 0x001017ff */
    FLASH_DF_BLOCK_6       = 0x00101800,    /*   1KB: 0x00101800 - 0x00101bff */
    FLASH_DF_BLOCK_7       = 0x00101C00,    /*   1KB: 0x00101C00 - 0x00101fff */
    FLASH_DF_BLOCK_INVALID = 0x00102000     /*   1KB: Can't write beyond 0x00101fff */
} flash_block_address_t;


/*  According to HW Manual (Table 39.50) the Max Programming Time for 4 bytes (ROM)
    is 490 us.  This is with a FCLK of 32MHz. The calculation below
    calculates the number of ICLK ticks needed for the timeout delay.
    The 490us number is adjusted linearly depending on the FCLK frequency.
*/
#define WAIT_MAX_ROM_WRITE \
        ((int32_t)(490 * (32.0/(MCU_CFG_FCLK_HZ/1000000)))*(MCU_CFG_ICLK_HZ/1000000))

/*  According to HW Manual (Table 39.53) the Max Programming Time for 1 bytes
    (Data Flash) is 374 us.  This is with a FCLK of 32MHz. The calculation
    below calculates the number of ICLK ticks needed for the timeout delay.
    The 374 us number is adjusted linearly depending on the FCLK frequency.
*/
#define WAIT_MAX_DF_WRITE \
        ((int32_t)(374 * (32.0/(MCU_CFG_FCLK_HZ/1000000)))*(MCU_CFG_ICLK_HZ/1000000))

/*  According to HW Manual (Table 39.53) the Max Blank Check time for 1 bytes
    (Data Flash) is 16 usec.  This is with a FCLK of 32MHz. The calculation
    below calculates the number of ICLK ticks needed for the timeout delay.
    The 16 usec number is adjusted linearly depending on the FCLK frequency.
*/
#define WAIT_MAX_BLANK_CHECK \
        ((int32_t)(16 * (32.0/(MCU_CFG_FCLK_HZ/1000000)))*(MCU_CFG_ICLK_HZ/1000000))


/*  According to HW Manual (Table 39.50) the Max Erasure Time for a 1KB block is
    around 214ms.  This is with a FCLK of 32MHz. The calculation below
    calculates the number of ICLK ticks needed for the timeout delay.
    The 214ms number is adjusted linearly depending on the FCLK frequency.
*/
#define WAIT_MAX_ERASE_CF_1K \
        ((int32_t)(214000 * (32.0/(MCU_CFG_FCLK_HZ/1000000)))*(MCU_CFG_ICLK_HZ/1000000))


/*  According to HW Manual (Table 39.53) the Max Erasure Time for a 1KB Data Flash block is
    around 228ms.  This is with a FCLK of 32MHz. The calculation below
    calculates the number of ICLK ticks needed for the timeout delay.
    The 228ms number is adjusted linearly depending on the FCLK frequency.
*/
#define WAIT_MAX_ERASE_DF_1K \
        ((int32_t)(228000 * (32.0/(MCU_CFG_FCLK_HZ/1000000)))*(MCU_CFG_ICLK_HZ/1000000))

#define WAIT_MAX_ERASE_DF   WAIT_MAX_ERASE_DF_1K

/*  According to HW Manual the Max Setting Time for Start-up area switching and Access window is around 549ms.
    This is with a FCLK of 1MHz. 
    The calculation below calculates the number of ICLK ticks needed for the timeout delay.
    The 549ms number is adjusted linearly depending on the FCLK frequency.
*/
#define WAIT_MAX_EXRDY_CMD_TIMEOUT \
        ((int32_t)(549000 *(MCU_CFG_ICLK_HZ/1000000)))

#endif /* _FLASH_API_RX130_H */
